package com.hqyj.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 入库执行记录
 * </p>
 *
 * @author rock
 * @since 2021-10-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class Warehousing extends Page implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "warehousing_id", type = IdType.AUTO)
    private Integer warehousingId;

    private Integer sysId;

    private Integer purchaseId;

//    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date warehousingTime;

    @TableField(exist = false)
    private String wTime;

    public void setWarehousingTime(String warehousingTime) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

        try {
            this.warehousingTime =  sdf.parse(warehousingTime);
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }

    public void setWarehousingTime(Date warehousingTime) {
        this.warehousingTime = warehousingTime;
    }

//        public String getWarehousingTime() {
//        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//
//        return sdf.format(this.warehousingTime);






}
